<template>
    <uni-popup ref="sharePopupTip" type="center" mask-background-color="rgba(0,0,0,0.8)">
        <div class="share_mask" @click="$refs.sharePopupTip.close()">
            <p>1、配文已复制，点击右上角“···”分享</p>
            <p>2、发送给朋友，或分享到朋友圈</p>
            <image src="/static/images/CopyToGuide-five.gif" mode="widthFix" />
            <div class="content">
                <i class="icon-close"></i>
                <p>{{title}}</p>
                <div class="btn">以上文字已复制，请在分享时使用</div>
            </div>
        </div>
    </uni-popup>
</template>

<script>
export default {
    data() {
        return {
            title: ''
        }
    },
    methods: {
        open(title) {
            this.title = title
            uni.setClipboardData({
                data: title,
                showToast: false,
                success: () => {
                    console.log('success');
                }
            });
            this.$refs.sharePopupTip.open()
        },
    }

}
</script>

<style lang="less" scoped>
.share_mask{
    width: 750rpx;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    >p{
        padding: 0 30rpx;
        font-size: 36rpx;
        line-height: 60rpx;
        color: #fff;
    }
    image{
        width: 600rpx;
        margin: 50rpx auto;
    }

    .content{
        background: #fff;
        border-radius: 40rpx 40rpx 0 0;
        padding: 50rpx 30rpx 30rpx;
        position: relative;
        i.icon-close{
            position: absolute;
            top: 0;
            right: 30rpx;
        }
        p{
            margin-bottom: 30rpx;
            line-height: 50rpx;
            padding: 0 10rpx;
        }
        .btn{
            width: 100%;
            height: 100rpx;
            background: @mainColor;
            font-size: 34rpx;
            color: #fff;
            .align(center);
            box-shadow: 0 0 10rpx @mainColor;
            border-radius: 50rpx;
        }
    }

}
</style>